{{ define "title" }}{{ .Site.Title }}{{ end }}

{{ define "main" }}
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
    <div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
        <div class="summary__container" data-display="block">
            {{ $filteredPages := .Site.RegularPages }}
            {{ range $.Param "notAllowedTypesInHome" }}
                {{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
            {{ end }}
            {{ $paginator := .Paginate $filteredPages }}
            {{ range $paginator.Pages }}
                {{ .Render "summary" }}
            {{ end }}
            {{ partial "pagination/pagination" . }}
        </div>
        {{ partial "search/search-result-desktop" . }}
    </div>

    {{ if $.Param "enableSidebar" }}
        <aside class="list__sidebar {{ if eq ($.Param "sidebarPosition") "left" }}l{{ else }}r{{ end }}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
            {{ partial "sidebar/sidebar-home" . }}
        </aside>
    {{ end }}
</main>
{{ partial "script/sidebar-script" . }}
{{ partial "script/home-script" . }}
{{ end }}